require(['./config'], () => {
    require(['swiper','header','footer'], (Swiper) => {
        class Index {
            constructor () {
                this.banner()
            }
            banner () {
                new Swiper ('.swiper-container', {
                    loop: true, // 循环模式选项
                    
                    // 如果需要分页器
                    pagination: {
                      el: '.swiper-pagination',
                    },
                    
                    // 如果需要前进后退按钮
                    navigation: {
                      nextEl: '.swiper-button-next',
                      prevEl: '.swiper-button-prev',
                    },
                    //自动播放
                    autoplay:true,
                    // 如果需要滚动条
                    scrollbar: {
                      el: '.swiper-scrollbar',
                      clickable :true,
                    },
                })  
            }
        }       
        new Index()
    })
})
